/*
 * @Descripttion:
 * @Author: Silence
 * @Date: 2023-05-30 19:47:31
 * @LastEditors: Silence
 * @LastEditTime: 2023-05-30 21:06:08
 */
import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/login',
    name: 'Login',
    component: () => import('../views/Login.vue')
  },
  {
    path: '/register',
    name: 'Register',
    component: () => import('../views/Register.vue')
  },
  {
    path: '/',
    name: 'Layout',
    redirect: '/article',
    component: () => import('../views/Layout.vue'),
    children: [
      {
        path: '/article',
        name: 'Article',
        component: () => import('../views/Article.vue')
      },
      {
        path: '/colloct',
        name: 'Colloct',
        component: () => import('../views/Colloct.vue')
      },
      {
        path: '/like',
        name: 'Like',
        component: () => import('../views/Like.vue')
      },
      {
        path: '/my',
        name: 'My',
        component: () => import('../views/My.vue')
      }
    ]
  },
  {
    path: '/detail',
    name: 'Detail',
    component: () => import('../views/Detail.vue')
  }
]

const router = new VueRouter({
  routes
})

export default router
